import request from '@/config/axios'
/**
 * 分页查询费用类别
 */
export const query = (params) => {
  return request.get({ url: '/fee/fee-category/query', params })
}

/**
 * 新建费类别
 */
export const create = (data) => {
  return request.post({ url: '/fee/fee-category/create', data })
}

/**
 * 更新费用类别
 */
export const update = (params) => {
  return request.get({ url: '/fee/fee-category/update', params })
}

/**
 * 删除费用类别
 */
export const deleted = (id) => {
  return request.delete({ url: '/fee/fee-category/deleted?id=' + id })
}

/**
 * 获取单个费用类型
 */
export const get = (id) => {
  return request.get({ url: '/fee/fee-category/get?id=' + id })
}

/**
 * 获取初始收费类型
 */
export const getFirstFee = () => {
  return request.get({ url: '/fee/fee-category/get-first-fee' })
}

/**
 * 查询费用类别
 */
export const listQuery = () => {
  return request.get({ url: '/fee/fee-category/list-query' })
}

/**
 * 根据类型获取费用类别
 */
export const getByType = (type) => {
  return request.get({ url: '/fee/fee-category/get-by-type?type=' + type })
}
